<?php
namespace app\index\controller;
use think\facade\Db;

class User{
    public function getUserList(){
//        $info=Db::table('ecm_user')->where('id','=',1)->find();
//        $info = Db::name('user')->find(2);
//        echo "<pre>";
//        print_r($info);
//        echo "</pre>";
//        $arr = Db::name('user')->select();
        $arr1 = Db::name('user')->where('id',1)->value('uname');
        $arr2 = Db::name('user')->column('uname');
        $arr3 = Db::name('user')->column('uname','id');

        echo "<pre>";
        print_r($arr1);
        echo "</pre>";
        echo "<br>";
        echo "<pre>";
        print_r($arr2);
        echo "</pre>";
        echo "<br>";
        echo "<pre>";
        print_r($arr3);
        echo "</pre>";
//        return 'index/User/getUserList';
    }
}